package bdz.projects.sc.core
{
	
	/**
	 * ...
	 * @author ...
	 */
	public dynamic class RaceList extends Array 
	{
		public function RaceList(xlist:XMLList):void {
			applyValues(xlist);
		}
		protected function applyValues(xlist:XMLList):void {
			for each(var xm:XML in xlist) {
				push(new SCRace(xm));
			}
		}
		public function findRace(r:String):SCRace{
			for each(var rc:SCRace in this){
				if(rc.name.toLowerCase() == r.toLowerCase()){
					return rc;
				}
			}
			return null;
		}
	}
	
}